<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>产品信息</title>
</head>
<body>
	<div class="modal fade" id="productDialog" role="dialog"
		aria-labelledby="productDialogLabel" aria-hidden="true" data-backdrop="static"
		>
		<form id="productDetail" method="post" name="productDetail"
			class="jqtransform">
			<div class="modal-dialog" tabindex="0" style="width: 1000px">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							<span aria-hidden="true">&times;</span> <span class="sr-only">Close</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">产品信息</h4>
						<input type="hidden" id="proId" required name="id"
							value="${product.id}" />
					</div>
					<div class="modal-body">
						<div align="left">
							<div align="center">
								<!--选项卡-->
								<div class="container-fluid">
									<div class="row-fluid">
										<div class="span12">
											<div class="tabbable" id="tabs-234974">
												<ul class="nav nav-tabs">
													<li class="active"><a href="#baseInfor"
														data-toggle="tab">产品信息</a></li>
												</ul>
												<div class="tab-content">
													<div class="tab-pane active" id="baseInfor">
														<table class="table table-bordered">
															<tr>
																<td colspan="4" style="text-align: left;">
																	<table class="table table-bordered">
																		<tr>
																			<td style="text-align: right; width: 150px;">产品编号:</td>
																			<td><input style="width: 250px;" type="text"
																				id="proCode" required name="proCode"
																				value="${product.proCode}" readonly="readonly"
																				class="inputxt Validform_error" datatype="*"
																				nullmsg="请选择类型名称以获取编码" /> <span
																				class="Validform_checktip">请填写类型名称以获取编码</span></td>
																			<td style="text-align: right;">产品名称:</td>
																			<td style="width: 300px;"><input
																				style="width: 300px;" type="text" id="proName"
																				required name="proName" value="${product.proName}"
																				datatype="*" errormsg="请填写产品名称"
																				class="inputxt Validform_error" nullmsg="请填写产品名称" />
																				<span class="Validform_checktip">请填写产品名称</span></td>
																		</tr>
																		<tr>
																			<td style="text-align: right; width: 150px;">产品分类:</td>
																			<td style="text-align: left; width: 150px;"><select
																				class="need" id="typeId" required name="typeId">
																					<option value="-1">请选择</option>
																					<c:forEach var="proType" items="${proTypes}">
																						<option
																							<c:if test="${proType.id==product.typeId}">selected</c:if>
																							value="${proType.id}">${proType.typeName}</option>
																					</c:forEach>
																			</select></td>
																			<td style="text-align: right; width: 150px;">是否为样品:</td>
																			<td><input type="hidden" id="isdemo" required
																				name="isdemo" value="${product.isdemo}" /> <select
																				id="productStatus" required name="productStatus"
																				class="need">
																					<c:forEach var="isdemo" items="${productStatus}">
																						<option
																							<c:if test="${isdemo.key==product.isdemo}">selected</c:if>
																							value="${isdemo.key}">${isdemo.val}</option>
																					</c:forEach>
																			</select></td>
																		</tr>
																	</table>
																</td>
															</tr>
															<tr>
																<td colspan="4" style="text-align:left;">
																	<table class="table table-bordered">
																		<tr>
																			<td style="text-align: right; width: 100px;">产地:</td>
																			<td colspan="3"><input style="width: 100%;"
																				type="text" id="grown" required name="grown"
																				value="${product.grown}"
																				class="inputxt Validform_error" datatype="*"
																				errormsg="请填写产地信息" nullmsg="请填写产地信息" /> <span
																				class="Validform_checktip">请填写产地信息</span></td>
																		</tr>
																	</table>
																</td>
															</tr>
															<tr>
																<td colspan="4" style="text-align: center;">
																	<table style="width: 100%" class="table table-bordered">
																		<tr>
																			<td style="text-align: right; width: 100px;">厂商:</td>
																			<td><input style="width: 100%;" type="text"
																				id="factory" name="factory"
																				value="${product.factory}"
																				class="inputxt Validform_error" /></td>

																		</tr>
																		<tr>
																			<td style="text-align: right; width: 80px;">最小单位:</td>
																			<td style="text-align: left"><input
																				style="width: 100px;" type="text" id="unit"
																				name="unit" value="${product.unit}"
																				class="inputxt Validform_error" datatype="*"
																				errormsg="请填写产品最小单位" nullmsg="请填写产品最小单位" /></td>
																		</tr>
																	</table>
																</td>
															</tr>
															<tr><td colspan="4" style="text-align:left;">
															<table class="table table-bordered">
															<tr>
																<td style="text-align: right; width: 150px;">主图片:</td>
																<td colspan="3"><input style="width: 400px;"
																	type="text" id="pic" name="pic" required
																	value="${product.pic}" datatype="url"
																	class="inputxt Validform_error" readonly="readonly" errormsg="请上传产品主图片"
																	nullmsg="请上传产品主图片" />
																	<button type="button" id="picSelect">选择文件</button>
																	<button id="uploadBtn">上传</button> <img id="mainImg"
																	src="" datatype="url" /> <span class="Validform_checktip">请上传产品主图片</span>
																</td>

															</tr>
															<tr>
																<td style="text-align: right;">备注:</td>
																<td colspan="4"><textarea style="width: 400px;"
																		name="description" id="description">
															${product.description}
															</textarea></td>
															</tr>
															</table>
															</td></tr>
														</table>
													</div>

												</div>

											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div id="optBtn" class="modal-footer">
						<button id="saveBtn" type="submit" class="btn btn-primary">保存</button>
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>

			</div>
		</form>
	</div>


</body>
</html>